<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>if else分支语句演示文档</title>
    <script>
      var input_data = prompt("请输入您的年龄");
      if (input_data >= 18) {
        alert("成年人");
      } else if (input_data <= 18) {
        alert("未成年人");
      } else {
        alert("奇怪的事情发生了");
      }
      console.log(input_data);
    </script>
  </head>
  <body></body>
</html>
